package com.leeon.container;

import java.util.*;

import static net.mindview.util.Print.print;

public class ListA {

    private int i;

    public ListA(int i){
        this.i = i;
    }

    @Override
    public String toString() {
        return "a " + i;
    }

    public static void main(String[] args){
        ListA[] array = {new ListA(1),new ListA(2),new ListA(3),new ListA(4)};
        List<ListA> list = new ArrayList<ListA>(Arrays.asList(array));
        List<ListA> subList = list.subList(1,3);
        print(list);
        print(subList);
        list.removeAll(subList);
        print(list);
    }

}
